<?php
declare (strict_types = 1);

namespace app\admin\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class GoodGoods extends Model
{
    protected $type = [
        'end_time'  =>  'timestamp:Y/m/d',
    ];

    public function goodcate(){
        //return $this->belongsTo(GoodCate::class,'cate_id')->bind([
        //    'catetitle' => 'title'
        //]);
        return $this->belongsTo(GoodCate::class,'cate_id');
    }

    public function goodspace(){
        //return $this->belongsTo(GoodSpace::class,'space_id')->bind([
        //    'spacetitle' => 'title'
        //]);
        return $this->belongsTo(GoodSpace::class,'space_id');
    }
}
